import { ElNotification } from "element-plus";
import axios from "axios";

export default function (number, reply) {
  return new Promise((resolve, reject) => {
    axios
      .post("api/journal_issue_operator.php", {
        action: "reply",
        input: { number, reply },
      })
      .then((response) => {
        console.log(response.data);
        if (!response.data.result) response.data.result = [];
        ElNotification({
          type: "success",
          title: `已提交技保部门回复信息`,
          // message: queryInput.description,
        });
        resolve(response.data.result);
      })
      .catch((error) => {
        console.error("replyJournalIssue", error);
        reject(error);
      });
  });
}
